package com.aaa.outbound.mapper;

import com.aaa.entity.outbound.PickDetail;
import com.aaa.entity.outbound.ReviewDetail;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author aaa
 * @since 2020-12-03
 */
@Mapper
@Component
public interface ReviewDetailMapper extends BaseMapper<ReviewDetail> {
    @Select("select rd.* from o_review_detail rd\n" +
            "join o_review r on r.id=rd.pid\n" +
            "where r.outorderno=#{outorderno}")
    List<ReviewDetail> selectReviewDetailByOutorderno(String outorderno);

    @Select("select pd.commoditybar,pd.commodityname from o_picktask_detail pd\n" +
            "join o_outorder o on pd.pid=o.id\n" +
            "where o.outorderno=#{outorderno}")
    List<PickDetail> searchCommodityByOutorderno(String outorderno);
}
